#include <iostream>
#include <vector>
#include <string>
#include <ctime>
#include <cstdlib>
#include "../headers/pet.h"

using namespace std;

Pet::Pet() {
    m_hunger = 0;
    m_boredom = 0;
}

void Pet::Time() {
    srand(static_cast<unsigned int>(time(0)));
    int time_randnum = rand() % 100 + 1;
    if (time_randnum % 2 == 0) {
        m_hunger += 3;
    }
    if (time_randnum % 3 == 0) {
        m_boredom += 7;
    }
}

void Pet::Feed() {
    m_hunger -= 11;
    if (m_hunger < 0) {
        m_hunger = 0;
    }   
}

int Pet::GetHunger() {
    return m_hunger;
}

void Pet::Play() {
    m_boredom -= 25;
    if (m_boredom < 0) {
        m_boredom = 0;
    }
}

int Pet::GetBoredom() {
    return m_boredom;
}

void Pet::SetName(string name) {
    m_name = name;
}

string Pet::GetName() {
    return m_name;
}
